# Makefile voor het CanBot project team A 
# Kevin Vancauwenbergh

All:	CanBotA

CanBotA: Main.o LowLevel.o Serial.o ObstacleData.o RobotData.o Cmd.o CmdGenerator.o KortstePad.o PadEntry.o Point.o Punt.o sendcmd.o Voorwerp.o Client.o thread.o
	g++ Main.o LowLevel.o Serial.o ObstacleData.o RobotData.o Cmd.o CmdGenerator.o KortstePad.o PadEntry.o Point.o Punt.o sendcmd.o Voorwerp.o Client.o thread.o -lpthread -o CanBotA
# Variable with the options for all the seperate files
opt = -c -O1

Main.o: Main.cpp
	g++ Main.cpp $(opt)

# Compile the lowlevel files
LowLevel.o: lowLevel/LowLevel.cpp
	g++ lowLevel/LowLevel.cpp $(opt)

Serial.o: lowLevel/Serial.cpp
	g++ lowLevel/Serial.cpp $(opt)
	
# Compile the wifi files
Client.o: wifi/Client.cpp
	g++ wifi/Client.cpp $(opt)
thread.o: wifi/thread.cpp
	g++ -c wifi/thread.cpp

ObstacleData.o: wifi/ObstacleData.cpp
	g++ wifi/ObstacleData.cpp $(opt)

RobotData.o: wifi/RobotData.cpp
	g++ wifi/RobotData.cpp $(opt)

# Compile the strategy files
Cmd.o: strategy/Cmd.cpp
	g++ strategy/Cmd.cpp $(opt)

CmdGenerator.o: strategy/CmdGenerator.cpp
	g++ strategy/CmdGenerator.cpp $(opt)

KortstePad.o: strategy/KortstePad.cpp
	g++ strategy/KortstePad.cpp $(opt)

PadEntry.o: strategy/PadEntry.o
	g++ strategy/PadEntry.cpp $(opt)

Point.o: strategy/Point.cpp
	g++ strategy/Point.cpp $(opt)

Punt.o: strategy/Punt.cpp
	g++ strategy/Punt.cpp $(opt)

sendcmd.o: strategy/sendcmd.cpp
	g++ strategy/sendcmd.cpp $(opt)

Voorwerp.o: strategy/Voorwerp.cpp
	g++ strategy/Voorwerp.cpp -c

clean:
	rm *.o
